<?php
namespace Home\Controller;
use Think\Controller;
class SiteController extends MerchantController {

	public function _initialize(){
		parent::_initialize();	
	 	$this->model="site"; //表名
	 	$this->key="site_id";//排序键		 
	 	$this->title_index=L("my_website");//选项卡标题	
	}

	public function index(){
		$mist_arr=array('site_domain'=>I("site_domain"));
		$accute_arr=array('site_id'=>I('site_id'),'site_isactive'=>I('site_isactive'));
		$cookie_arr=array();	
		$con=searchCon($mist_arr,$accute_arr,$cookie_arr);
		$con['site_mid']=$this->merchant_info['mh_id'];		
		parent::home($con);
	}
	
	public function details(){
		$con['site_mid']=$this->merchant_info['mh_id'];		
		$con['site_id']=I('path.2');
		parent::details($con);		
	}
	
	public function addHandle(){
		$data=I();
		$data['site_mid']=$this->merchant_info['mh_id'];
		$data['site_key']=makePass(30);
		parent::addHandle($data);
	}
	
}